import request from '@/utils/request';

// 获取用户列表
export function userName(data) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: data
  })
}
// 新增时获取模板id
export function createProcessId(data) {
  return request({
    url: '/maintain/maintain/wf-models/create',
    method: 'post',
    data: data
  })
}

// 新增流程
export function addProcess(data) {
  return request({
    url: '/maintain/maintain/wf-process-def/save-process-definition',
    method: 'post',
    data: data
  })
}

// 发布流程
export function deployProcess(data) {
  return request({
    url: '/maintain/maintain/wf-process-def/deploy',
    method: 'get',
    params: data
  })
}

// 删除流程
export function deleteProcess(data) {
  return request({
    url: '/maintain/maintain/wf-process-def/delete-by-ids',
    method: 'get',
    params: data
  })
}

// 流程列表
export function processList(data) {
  return request({
    url: '/maintain/maintain/wf-process-def/list',
    method: 'get',
    params: data
  })
}

// 查看详情
export function details(data) {
  return request({
    url: '/maintain/maintain/wf-models/getModel',
    method: 'post',
    params: data
  })
}
